<!--
 * @Author: 追逐的娃 kangchao_php@163.com
 * @Date: 2024-11-01 10:26:26
 * @LastEditors: 追逐的娃 kangchao_php@163.com
 * @LastEditTime: 2024-11-01 11:32:54
 * @FilePath: \vue-project\src\components\Vue3Map\TianMap.vue
 * @Description: 
 * 
-->
<template>
  <div class="dashboard-editor-container">
    <div id="mapDiv"></div>
  </div>
</template>

<script setup>
import { onMounted, ref } from 'vue'
var marker = null
var map

const currentLngLat = ref([1114.51444, 22.114514])
const locateInfo = ref('')

onMounted(() => {
  initMap()
})

const initMap = () => {
  map = new T.Map('mapDiv')
  map.centerAndZoom(new T.LngLat(116.40769, 39.89945), 15) //地图的初始化中心点，此为北京的经纬度
  map.setMinZoom(5) // 设置地图缩放比
  map.setMaxZoom(18) // 设置地图缩放比
}
</script>

<style lang="scss" scoped>
#mapDiv {
  width: 100%;
  height: 400px;
}
</style>